package SparkShiXun

import redis.clients.jedis.{Jedis, JedisPool, JedisPoolConfig}

/**
  * Created by Administrator on 2016/9/9 0009.
  */
object RedisUtil {
  val config = new JedisPoolConfig
  config.setMaxIdle(1000)
  config.setMaxTotal(10240)
  val jedisPool = new JedisPool(config, "hadoop1", 6379, 0)

  def getJedis(): Jedis = {
    jedisPool.getResource
  }


  def main(args: Array[String]) {

  }
}
